| Conditions | 3 |
| Paths | > 20000 |
| Total Lines | 63 |
| Code Lines | 2 |
| Lines | 63 |
| Ratio | 100 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | View Code Duplication | /******/ (function(modules) { // webpackBootstrap |
|
| 78 | View Code Duplication | !function (e, t, n) { |
|
| 79 | function o(e, t) { |
||
| 80 | return (typeof e === "undefined" ? "undefined" : _typeof(e)) === t; |
||
| 81 | }function a() { |
||
| 82 | var e, t, n, a, s, i, r;for (var l in c) { |
||
| 83 | if (c.hasOwnProperty(l)) { |
||
| 84 | if (e = [], t = c[l], t.name && (e.push(t.name.toLowerCase()), t.options && t.options.aliases && t.options.aliases.length)) for (n = 0; n < t.options.aliases.length; n++) { |
||
| 85 | e.push(t.options.aliases[n].toLowerCase()); |
||
| 86 | }for (a = o(t.fn, "function") ? t.fn() : t.fn, s = 0; s < e.length; s++) { |
||
| 87 | i = e[s], r = i.split("."), 1 === r.length ? Modernizr[r[0]] = a : (!Modernizr[r[0]] || Modernizr[r[0]] instanceof Boolean || (Modernizr[r[0]] = new Boolean(Modernizr[r[0]])), Modernizr[r[0]][r[1]] = a), f.push((a ? "" : "no-") + r.join("-")); |
||
| 88 | } |
||
| 89 | } |
||
| 90 | } |
||
| 91 | }function s(e) { |
||
| 92 | var t = u.className, |
||
| 93 | n = Modernizr._config.classPrefix || "";if (p && (t = t.baseVal), Modernizr._config.enableJSClass) { |
||
| 94 | var o = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");t = t.replace(o, "$1" + n + "js$2"); |
||
| 95 | }Modernizr._config.enableClasses && (t += " " + n + e.join(" " + n), p ? u.className.baseVal = t : u.className = t); |
||
| 96 | }function i() { |
||
| 97 | return "function" != typeof t.createElement ? t.createElement(arguments[0]) : p ? t.createElementNS.call(t, "http://www.w3.org/2000/svg", arguments[0]) : t.createElement.apply(t, arguments); |
||
| 98 | }function r() { |
||
| 99 | var e = t.body;return e || (e = i(p ? "svg" : "body"), e.fake = !0), e; |
||
| 100 | }function l(e, n, o, a) { |
||
| 101 | var s, |
||
| 102 | l, |
||
| 103 | f, |
||
| 104 | c, |
||
| 105 | d = "modernizr", |
||
| 106 | p = i("div"), |
||
| 107 | v = r();if (parseInt(o, 10)) for (; o--;) { |
||
| 108 | f = i("div"), f.id = a ? a[o] : d + (o + 1), p.appendChild(f); |
||
| 109 | }return s = i("style"), s.type = "text/css", s.id = "s" + d, (v.fake ? v : p).appendChild(s), v.appendChild(p), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(t.createTextNode(e)), p.id = d, v.fake && (v.style.background = "", v.style.overflow = "hidden", c = u.style.overflow, u.style.overflow = "hidden", u.appendChild(v)), l = n(p, e), v.fake ? (v.parentNode.removeChild(v), u.style.overflow = c, u.offsetHeight) : p.parentNode.removeChild(p), !!l; |
||
| 110 | }var f = [], |
||
| 111 | c = [], |
||
| 112 | d = { _version: "3.5.0", _config: { classPrefix: "", enableClasses: !0, enableJSClass: !0, usePrefixes: !0 }, _q: [], on: function on(e, t) { |
||
| 113 | var n = this;setTimeout(function () { |
||
| 114 | t(n[e]); |
||
| 115 | }, 0); |
||
| 116 | }, addTest: function addTest(e, t, n) { |
||
| 117 | c.push({ name: e, fn: t, options: n }); |
||
| 118 | }, addAsyncTest: function addAsyncTest(e) { |
||
| 119 | c.push({ name: null, fn: e }); |
||
| 120 | } }, |
||
| 121 | Modernizr = function Modernizr() {};Modernizr.prototype = d, Modernizr = new Modernizr(), Modernizr.addTest("svg", !!t.createElementNS && !!t.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect);var u = t.documentElement, |
||
| 122 | p = "svg" === u.nodeName.toLowerCase();Modernizr.addTest("canvas", function () { |
||
| 123 | var e = i("canvas");return !(!e.getContext || !e.getContext("2d")); |
||
| 124 | }), Modernizr.addTest("canvastext", function () { |
||
| 125 | return Modernizr.canvas === !1 ? !1 : "function" == typeof i("canvas").getContext("2d").fillText; |
||
| 126 | }), Modernizr.addTest("emoji", function () { |
||
| 127 | if (!Modernizr.canvastext) return !1;var t = e.devicePixelRatio || 1, |
||
| 128 | n = 12 * t, |
||
| 129 | o = i("canvas"), |
||
| 130 | a = o.getContext("2d");return a.fillStyle = "#f00", a.textBaseline = "top", a.font = "32px Arial", a.fillText("🐨", 0, 0), 0 !== a.getImageData(n, n, 1, 1).data[0]; |
||
| 131 | });var v = d._config.usePrefixes ? " -webkit- -moz- -o- -ms- ".split(" ") : ["", ""];d._prefixes = v;var m = d.testStyles = l;Modernizr.addTest("touchevents", function () { |
||
| 132 | var n;if ("ontouchstart" in e || e.DocumentTouch && t instanceof DocumentTouch) n = !0;else { |
||
| 133 | var o = ["@media (", v.join("touch-enabled),("), "heartz", ")", "{#modernizr{top:9px;position:absolute}}"].join("");m(o, function (e) { |
||
| 134 | n = 9 === e.offsetTop; |
||
| 135 | }); |
||
| 136 | }return n; |
||
| 137 | }), a(), s(f), delete d.addTest, delete d.addAsyncTest;for (var h = 0; h < Modernizr._q.length; h++) { |
||
| 138 | Modernizr._q[h](); |
||
| 139 | }e.Modernizr = Modernizr; |
||
| 140 | }(window, document); |
||
| 141 | |||
| 152 | /******/ }); |